﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:tns="http://www.utillity.com/schemas/rave/v1" elementFormDefault="qualified" targetNamespace="http://www.utillity.com/schemas/rave/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Configuration" type="tns:Configuration" />
  <xs:complexType name="Configuration">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="Directories" nillable="true" type="tns:ArrayOfDirectory" />
      <xs:element minOccurs="0" maxOccurs="1" name="Members" type="tns:ArrayOfChoice2" />
      <xs:element minOccurs="0" maxOccurs="1" name="StorageAdapterConfiguration">
        <xs:complexType mixed="true">
          <xs:sequence>
            <xs:any maxOccurs="unbounded" />
          </xs:sequence>
          <xs:anyAttribute />
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="targetSystem" type="xs:string" />
    <xs:attribute name="rootDirectory" type="xs:string" />
    <xs:attribute default="true" name="createRootDirectory" type="xs:boolean" />
  </xs:complexType>
  <xs:complexType name="ArrayOfDirectory">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Directory" nillable="true" type="tns:Directory" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Directory">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="Name" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="SecurityEntries" type="tns:ArrayOfChoice1" />
      <xs:element minOccurs="0" maxOccurs="1" name="SubDirectories" type="tns:ArrayOfDirectory" />
    </xs:sequence>
    <xs:attribute default="false" name="removeAllOtherSecurityEntries" type="xs:boolean" />
    <xs:attribute default="false" name="removeSecurityEntriesInheritance" type="xs:boolean" />
    <xs:attribute default="true" name="skipProcessingIfDirectoryExists" type="xs:boolean" />
  </xs:complexType>
  <xs:complexType name="ArrayOfChoice1">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element minOccurs="1" maxOccurs="1" name="UserSecurityEntry" nillable="true" type="tns:UserSecurityEntry" />
      <xs:element minOccurs="1" maxOccurs="1" name="SecurityEntry" nillable="true" type="tns:SecurityEntry" />
      <xs:element minOccurs="1" maxOccurs="1" name="GroupSecurityEntry" nillable="true" type="tns:GroupSecurityEntry" />
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="UserSecurityEntry">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:SecurityEntry" />
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="SecurityEntry">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="MemberID" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="Rights" type="xs:string" />
    </xs:sequence>
    <xs:attribute default="Unknown" name="type" type="tns:MemberType" />
    <xs:attribute default="Allow" name="access" type="tns:AccessControlType" />
    <xs:attribute default="false" name="dontAddToAcl" type="xs:boolean" />
    <xs:attribute default="ContainerInherit ObjectInherit" name="inheritanceFlags" type="tns:InheritanceFlags" />
    <xs:attribute default="None" name="propagationFlags" type="tns:PropagationFlags" />
  </xs:complexType>
  <xs:simpleType name="MemberType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Unknown" />
      <xs:enumeration value="User" />
      <xs:enumeration value="Group" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="AccessControlType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Allow" />
      <xs:enumeration value="Deny" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="InheritanceFlags">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="None" />
          <xs:enumeration value="ContainerInherit" />
          <xs:enumeration value="ObjectInherit" />
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>
  <xs:simpleType name="PropagationFlags">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="None" />
          <xs:enumeration value="NoPropagateInherit" />
          <xs:enumeration value="InheritOnly" />
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>
  <xs:complexType name="GroupSecurityEntry">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:SecurityEntry" />
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="ArrayOfChoice2">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element minOccurs="1" maxOccurs="1" name="User" nillable="true" type="tns:User" />
      <xs:element minOccurs="1" maxOccurs="1" name="Group" nillable="true" type="tns:Group" />
      <xs:element minOccurs="1" maxOccurs="1" name="Member" nillable="true" type="tns:Member" />
    </xs:choice>
  </xs:complexType>
  <xs:complexType name="User">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:Member" />
    </xs:complexContent>
  </xs:complexType>
  <xs:complexType name="Member">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="Identifier" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="IdentificationType" type="xs:string" />
      <xs:element minOccurs="0" maxOccurs="1" name="AdditionalInformation" type="tns:AdditionalInformation" />
      <xs:element minOccurs="0" maxOccurs="1" name="CreationConfiguration" type="tns:CreationConfiguration" />
    </xs:sequence>
    <xs:attribute name="id" type="xs:string" />
    <xs:attribute default="User" name="type" type="tns:MemberType" />
  </xs:complexType>
  <xs:complexType name="AdditionalInformation">
    <xs:sequence>
      <xs:any minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="CreationConfiguration">
    <xs:sequence>
      <xs:any minOccurs="0" maxOccurs="1" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="Group">
    <xs:complexContent mixed="false">
      <xs:extension base="tns:Member" />
    </xs:complexContent>
  </xs:complexType>
</xs:schema>